{extend name="personal/index" /}

  {block name="center"}
  <link rel="stylesheet" href="static/css/album/my1.css">


   <div class="plc_main">
    <!--右侧开始-->
    <div class="main_cont">
     <div class="path_title">
      <span class="photo_title">我的相册</span>
      <a class="return" href="indexAlbumIndex" title="返回相册首页&gt;&gt;">返回相册首页&gt;&gt;</a>
     </div>
     <div class="photo_nav">

      <a class="u_photo_btn" href="indexAlbumAddimg" target="_self">上传照片</a>

      <a class="add_cats" id="addcats" href="javascript:void(0);" onclick="overlay()">创建相册</a>
      <div class="photo_space">
       <span class="title">容量：</span>
       <div class="box">
        <span class="percent" style="width:0.14%"></span>
       </div>
       <div class="tips">
        <span class="num">1.48M</span>/1G
       </div>
      </div>
     </div>
     <div class="sub_tab sub_tab_nb">
      <ul>
       <!--<li class="current">-->
       <li class="current"><a href="">全部</a></li>
      </ul>
     </div>
     <!--相册列表开始-->
     <div class="album_list">
      <ul>
  <!-- {php}var_dump($albumList);{/php} -->
      
      {volist name="albumList" id="album"}
       <li picid="1309885" petname="1" content="1111111" petid="">
        <div class="album_wrap">
         <div class="album_cover">
          <a href="indexAlbumImage?id={$album.id}" title="相册名称" style="display: block; overflow: hidden; width: 160px; height: 160px;"><img src="static/image/album/nopic160.gif" onload="this.onload=null;BQ.imgLoad(this,[160,160],[160,160]);" style="display: block;" /></a>
         </div>
         <div class="multi_grid">
          <ul>
           <li><a href="indexAlbumImage?id={$album.id}" style="display: block; overflow: hidden; width: 78px; height: 78px;"><img src="static/image/album/nopic80.gif" onload="this.onload=null;BQ.imgLoad(this,[78,78],[78,78]);" style="display: block;" /></a></li>
           <li><a href="indexAlbumImage?id={$album.id}" style="display: block; overflow: hidden; width: 78px; height: 78px;"><img src="static/image/album/nopic80.gif" onload="this.onload=null;BQ.imgLoad(this,[78,78],[78,78]);" style="display: block;" /></a></li>
           <li><a href="indexAlbumImage?id={$album.id}" style="display: block; overflow: hidden; width: 78px; height: 78px;"><img src="static/image/album/nopic80.gif" onload="this.onload=null;BQ.imgLoad(this,[78,78],[78,78]);" style="display: block;" /></a></li>
           <li><a href="indexAlbumImage?id={$album.id}" style="display: block; overflow: hidden; width: 78px; height: 78px;"><img src="static/image/album/nopic80.gif" onload="this.onload=null;BQ.imgLoad(this,[78,78],[78,78]);" style="display: block;" /></a></li>
          </ul>
         </div>
        </div>
        <div class="album_title">
         <a href="indexAlbumImage?id={$album.id}">{$album.title}</a>({$album.createtime})
        </div>
        </li>
      {/volist}



      </ul>
     </div>
     <!--相册列表结束-->
     <!--分页开始-->
     <div class="page_wrap">
      <div class="showpage"></div>
     </div>
     <!--分页结束-->
    </div>
    <!--右侧结束-->
   </div>


<form action="indexAlbumAddalbum" method="post" id=forms>
<div id="modal-overlay"> 
  <div class="modal-data"> 
      <p>创建相册</p>
      <input type="text" id="name" name="title" placeholder="请输入相册名称"><br/>
      <textarea name="description" id="content" cols="40" rows="3" placeholder="请输入相册简介"></textarea><br/>
      <input type="hidden" name="use_id" value="1">
      <button type="button" class="btn cancel_btn" data-dismiss="modal" onclick="overlay()">取消</button>
      <button type="button" id="sure" class="btn submit_btn" index="a">确定</button>

  </div>
</div>
</form>


  <script>
      function overlay(){
        var e1 = document.getElementById('modal-overlay');      
        e1.style.visibility =  (e1.style.visibility == "visible"  ) ? "hidden" : "visible";

      }

      $('#sure').click(function(){
        var info = $('#forms :input').serialize();
        $.ajax({
            type: 'post',
            url: "indexAlbumAddalbum",
            data: info,
            dataType:'json',
            success: function(data){
              if(data === '保存信息成功'){
                alert(data);
                overlay();
                location.reload();
              }
              if(data != '保存信息成功'){
                alert(data);
              }


            }
        });

      });


  </script>


  {/block}
